<template>
	<div class="inviocedetail inviocelist">
	  <div class="inviocelist_head" v-if="hide!='1'">
	    <div class="detail_head" >
		  	<div class="inviocelist_head_img">
	  		  <img :src="userinfo.headimgurl" alt="" v-if="userinfo.headimgurl!=''">
	  		  <img src="../../assets/image/default.png" alt="" v-else>
		  	</div>
		  	<span>{{userinfo.name}}</span>
	  	</div>
	  	<router-link class="detail_right" :to="{path:'/inviocelist',query:{id:'1'}}" >
	  		<span>我的开票记录</span>
	  		<i></i>
	  	</router-link>
	  </div>
	  <div class="invioce_status" v-if="hide!='1'">
	  	开票状态：{{info.status}}
	  </div>
	  <div class="input_list">
<!-- 	    <div class="input_item">
	      <div class="input_left">{{info.create_time}}</div>
	      <div class="input_right insuccess" v-if="info.status=='开票中'">开票中</div>
	      <div class="input_right success" v-if="info.status=='开票成功'">开票成功</div>
	    </div>  -->
	    <div class="input_item" v-if="hide=='1'">
	      <div class="input_left">开票状态</div>
	      <div class="input_right" style="color: #979797">{{info.status}}</div>
	    </div> 
	    <div class="input_item" >
	      <div class="input_left">发票类型</div>
	      <div class="input_right" v-if="info.type=='0'" style="color: #979797">增值税专用发票</div>
	      <div class="input_right" v-if="info.type=='1'&&info.rise_type=='0'" style="color: #979797">普通企业发票</div>
	      <div class="input_right" v-if="info.type=='1'&&info.rise_type=='1'" style="color: #979797">普通个人发票</div>
	    </div> 
	    <div class="input_item" >
	      <div class="input_left">发票抬头</div>
	      <div class="input_right" style="color: #979797">{{info.rise}}</div>
	    </div> 

	    <div class="input_item" v-if="info.duty_num">
	      <div class="input_left">税号</div>
	      <div class="input_right" style="color: #979797">{{info.duty_num}}</div>
	    </div> 

	    <div class="input_item" v-if="info.open_bank">
	      <div class="input_left">基本开户银行</div>
	      <div class="input_right" style="color: #979797">{{info.open_bank}}</div>
	    </div> 

	    <div class="input_item" v-if="info.register_address">
	      <div class="input_left">注册场所地址</div>
	      <div class="input_right" style="color: #979797">{{info.register_address}}</div>
	    </div> 
	    <div class="input_item" v-if="info.register_phone">
	      <div class="input_left">注册场所电话</div>
	      <div class="input_right" style="color: #979797">{{info.register_phone}}</div>
	    </div> 
	    <div class="input_item">
	      <div class="input_left">发票内容</div>
	      <div class="input_right" style="color: #979797">{{info.detail}}</div>
	    </div> 
	    <div class="input_item">
	      <div class="input_left">发票金额</div>
	      <div class="input_right" style="color: #979797">¥{{info.price}}</div>
	    </div> 
	    <div class="input_textarea">
	      <div class="input_left">备注</div>
	      <div class="textnote" style="color: #979797">{{info.note||'无'}}</div>
	    </div>
<!-- 	    <div class="watchdetail">
	    	<router-link :to="{path:'/orderdetail',query:{orderNumber:info.orderNumber}}">查看订单明细</router-link>
	    </div>    --> 		    	    
	   </div>		
	</div>
</template>
<script>
import axios from 'axios';
import {Toast } from 'mint-ui';
export default {
	data(){
		return{
      		info:'',
      		userinfo:"",
      		hide:""
		}
	},
	created(){
		  var that = this;
		  var orderNumber = that.$route.query.orderNumber;
		  var hide  = that.$route.query.hide;
		  that.hide = hide;
	      axios.post("/Weixin/Member/memberDetail",{}).then((res)=>{
	        if(res.data.code == "1"){
	        	this.userinfo = res.data.data;
	        }
	      }) 		 
	     axios.post("/Weixin/Order/invoiceDetail",{orderNumber:orderNumber}).then((res)=>{
	        if(res.data.code == "1"){
               that.info = res.data.data
	        }
	        else{
	        	Toast(res.data.msg)
	        }
	      })		
	}
}	
</script>
<style>
	
</style>
	